#include "StdAfx.h"
#include "SystemClass.h"

#if _DEBUG
#pragma comment(linker, "/SUBSYSTEM:Console") 
#endif

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pCmdLine, int nCmdShow)
{
	CSystemClass* pSystem;
	bool bResult;

	pSystem = new CSystemClass();

	if(pSystem == nullptr)
	{
		DEBUG_OUTPUT("Failed to initialize System Class");
		return 0;
	}

	bResult = pSystem->Initialize();

	if(bResult == true)
	{
		pSystem->Run();
	}
	else
	{
		system("pause");
	}

	pSystem->ShutDown();
	pSystem = nullptr;

	return 0;
}

int main(int nArgc, char* nArgv[])
{
	WinMain(GetModuleHandle(NULL), NULL, (PSTR)GetCommandLine(), SW_SHOWDEFAULT);
	return 0;
}